const sequelize = require('../config/sequelize')
const Sequelize = require('sequelize')

const Article = sequelize.define('articles', {
    articleId: {
        type: Sequelize.BIGINT,
        field: 'id'
    },
    userId: {
        type: Sequelize.BIGINT,
        field: 'user_id'
    },
    content: {
        type: Sequelize.STRING(20000),
        field: 'content'
    },
    totalRead: {
        type: Sequelize.BIGINT,
        field: 'total_read'
    },
    kind: {
        type: Sequelize.STRING(50),
        field: 'kind'
    },
    title: {
        type: Sequelize.STRING(100),
        field: 'title'
    },
    shortContent: {
        type: Sequelize.TEXT,
        field: 'shortContent'
    }
})

module.exports = Article